package com.henghong.CouponDemo.service.impl;

import com.henghong.CouponDemo.mapper.MaintenanceMapper;
import com.henghong.CouponDemo.service.MaintenanceService;
import com.henghong.CouponDemo.vo.MaintenanceVO;
import com.henghong.CouponDemo.vo.UsageHistoryVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;

@Service
public class MaintenanceServiceImpl implements MaintenanceService {

    @Autowired
    private MaintenanceMapper maintenanceMapper;

    @Override
    public MaintenanceVO getCouponMaintenanceInfo(String couponNo) {
        // テーブルからクーポン情報を取得する
        return maintenanceMapper.getCouponMaintenanceInfo(couponNo);
    }


    @Override
    public UsageHistoryVO getUsageHistory(String eachCouponId) {
        return maintenanceMapper.getUsageHistory(eachCouponId);
    }

}
